var mongoose = require('mongoose');

function Connect() {
    return mongoose.connect('mongodb://localhost:27017/youqiuer').then(()=> {
        console.log('MongoDB connected successfully');
    }).catch(err => {
        console.error('Database connection error:', err);
        throw err;
    });
}

module.exports = {
    Connect,
};